Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Migrate DataView related imports to data_views plugin #126315

Merged
merged 11 commits into from
Mar 15, 2022

Conversation

kertal
Copy link
Member

@kertal kertal commented Feb 24, 2022

Summary

This PR migrates imports of DataView related code from the data plugin to the data_views plugin

Part of #124063

@kertal kertal added Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Feb 24, 2022
@kertal kertal self-assigned this Feb 24, 2022
@kertal
Copy link
Member Author

kertal commented Feb 28, 2022

@elasticmachine merge upstream

@kertal kertal added v8.2.0 chore backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Feb 28, 2022
@kertal kertal requested a review from mattkime February 28, 2022 09:17
@kertal kertal changed the title [Discover] Reduce number of deprecated API usage [Discover] Migrate DataView related import to data_views plugin Feb 28, 2022
@kertal kertal changed the title [Discover] Migrate DataView related import to data_views plugin [Discover] Migrate DataView related imports to data_views plugin Feb 28, 2022
@kertal kertal marked this pull request as ready for review February 28, 2022 11:06
@kertal kertal requested a review from a team as a code owner February 28, 2022 11:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Contributor

@dimaanj dimaanj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM.

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but I have something I'd like to discuss imports from common with the core team before giving the final approval.

src/plugins/discover/public/__mocks__/index_pattern.ts Outdated Show resolved Hide resolved
@dimaanj
Copy link
Contributor

dimaanj commented Mar 9, 2022

@elasticmachine merge upstream

@kertal kertal requested a review from mattkime March 9, 2022 16:53
@@ -10,7 +10,8 @@ import React, { useState, Fragment, useMemo, useCallback } from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiHorizontalRule, EuiText } from '@elastic/eui';
import { CONTEXT_STEP_SETTING, DOC_HIDE_TIME_COLUMN_SETTING } from '../../../common';
import { DataView, SortDirection } from '../../../../data/common';
import type { DataView } from '../../../../data_views/public';
import { SortDirection } from '../../../../data/common';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data plugin imports should also be from public instead of common

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the tedious change requests, I'm working with core to figure out why these weren't disallowed with lint rules.

@kertal
Copy link
Member Author

kertal commented Mar 15, 2022

@elasticmachine merge upstream

@kertal kertal requested a review from a team as a code owner March 15, 2022 05:10
@kertal kertal requested a review from mattkime March 15, 2022 05:10
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 2822 2831 +9
dataViews 616 644 +28
total +37

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 376.6KB 376.6KB +53.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 456.6KB 456.9KB +299.0B
dataViews 40.2KB 40.4KB +248.0B
discover 50.5KB 50.4KB -138.0B
total +409.0B
Unknown metric groups

API count

id before after diff
data 3419 3444 +25
dataViews 765 796 +31
total +56

References to deprecated APIs

id before after diff
discover 95 44 -51

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kertal

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes lgtm, thanks for addressing my feedback!

@kertal kertal merged commit c36b0b5 into elastic:main Mar 15, 2022
maksimkovalev pushed a commit to maksimkovalev/kibana that referenced this pull request Mar 18, 2022
…stic#126315)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting chore Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants